<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title><{:C('web_site_name')}>---会员日志管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo APP_TMPL_PATH ; ?>/static/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo APP_TMPL_PATH ; ?>/static/css/main.css"/>

    <script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/jquery.js"></script>
    <script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/layer/lib.js"></script>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/layer/layer.min.js"></script>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/admin.js"></script>
</head>
<body>
<div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i>首页<span class="crumb-step">&gt;</span><span class="crumb-name">会员日志管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="#" method="post">
                    <table class="search-tab">
                        <tr>
                          <th width="70">uid编号:</th>
                            <td><input class="common-text" placeholder="用户编号 " name="uid" value="" id="uid" type="text"></td>
                            <th width="70">用户名:</th>
                            <td><input class="common-text" placeholder="用户名 " name="username" value="" id="username" type="text"></td>
                            <th width="70">手机号码:</th>
                            <td><input class="common-text" placeholder="手机号码 " name="phone" value="" id="phone" type="text"></td>
                            
                     
                               
                            <td>
                            <input class="btn btn-primary btn2" name="sub" value="查询" type="button" onclick="search()">
                           &nbsp;&nbsp;&nbsp;
                            
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                
                 <div class="list-page" id="page_string"> 2 条 1/1 页</div>
                <div class="result-content">
                    <table class="result-tab" width="100%" >
                        <tr>
                            <th>编号</th>
                            <th>用户编号</th>
                            <th>用户名</th>
                            <th>手机号码</th>
                            <th>操作信息</th>
                            <th>操作日期 </th>
                          
                        </tr>
                      <tbody id="result_"></tbody>
                        
                    </table>
          
                        
                    <div class="list-page" id="page_string"> 2 条 1/1 页</div>
                </div>
            </form>
        </div>
</body>
</html>
<script>
var loadding_0  ;
var page = 1 ;
$(function () {
    common_request();
});
function common_request(){
    var url="<?php echo U("memberlog/index");?>&inajax=1";
    var data_ = {
        'page':page,
        'time':<?php echo time();?>,
        'action':'ajax_data' , 
        'username':$("input[name='username']").val() , 
        'phone':$("input[name='phone']").val(),
        'uid':$("input[name='uid']").val()

    } ;
    $.ax(
        url,data_,true,"POST","JSON",function(msg){
        var shtml = '' ;
        var list = msg.resultinfo.list;
        if(msg.resultcode!= 1 ){
            layer.msg(msg.resultinfo.errmsg);
            return false ;
        }else{
            for(var i in list){
                shtml+='<tr>';
                shtml+= '<td>'+list[i].id+'</td>' ;
                shtml+='<td>'+list[i]['uid']+'</td>';
                shtml+='<td>'+list[i]['username']+'</td>';
                shtml+='<td>'+list[i]['phone']+'</td>';
                shtml+='<td>'+list[i]['message']+'</td>';
                shtml+='<td>'+list[i]['add_time']+'</td>';
                shtml+='</tr>';
            }
            $("#result_").html(shtml);
            $(".list-page").html(msg.resultinfo.obj);
        }
        layer.close(loadding_0);           
        },function(e){
            layer.msg('服务器繁忙请稍后');
            return false ;   
        },function(f){
            loadding_0 = layer.load('数据正在加载中1。。。。。。'); 
        }
    );    
}
function ajax_data(p){
    page = p  ; 
    common_request();
}
function search(){
    page = 1 ;
    common_request();
}

</script> 

